package com.wss.module.market.ui.goods.detail.adapter;

import com.wss.common.base.adapter.BaseListAdapter;
import com.wss.common.base.adapter.listener.OnListItemClickListener;
import com.wss.common.base.adapter.superadapter.SuperViewHolder;
import com.wss.module.market.ResourceTable;
import com.wss.module.market.bean.GoodsConfigBean;
import ohos.app.Context;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Describe：商品详情 规格参数适配器
 * Created by 吴天强 on 2018/10/19.
 */
public class GoodsConfigAdapter extends BaseListAdapter<GoodsConfigBean> {
    /**
     * 常规列表重写该方法
     *
     * @param context     context
     * @param list        数据源
     */
    public GoodsConfigAdapter(Context context, List<GoodsConfigBean> list) {
        super(context, list, ResourceTable.Layout_market_item_of_goods_config_list, null);
    }

    @Override
    public void onBindData(@NotNull SuperViewHolder holder, int layoutPosition, @NotNull GoodsConfigBean data) {
        holder.setText(ResourceTable.Id_tv_config_key, data.getKeyProp());
        holder.setText(ResourceTable.Id_tv_config_value, data.getValue());
    }
}
